package rpc.test.spring.annotation.consumer.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import rpc.annotation.RpcReference;
import rpc.test.api.DemoService;
import rpc.test.spring.annotation.consumer.service.ConsumerDemoService;

@Service
public class ConsumerDemoServiceImpl implements ConsumerDemoService {


    @RpcReference(registryType = "zookeeper", registryAddress = "127.0.0.1:2181", loadBalanceType = "zkconsistenthash", version = "1.0.0", group = "binghe", serializationType = "protostuff", proxy = "cglib", timeout = 30000, async = false, oneway = false)
    private DemoService demoService;

    @Override
    public String hello(String name) {
        return demoService.hello(name);
    }
}
